﻿using System.Net;

namespace Honeycomb.Core.Server
{
    /// <summary>
    /// Inherit from this class and override Authenticate(NetworkCredential) 
    /// method to implement own authentication scheme. You will also need to 
    /// assign GridServer.AuthenticateHandler to your own implementation.
    /// </summary>
    public class AuthenticateHandler
    {
        /// <summary>
        /// Method used to determine if a client should be considered as authenticated or not.
        /// </summary>
        /// <param name="networkCredential">Credentials to authenticate.</param>
        /// <returns>Boolean, True if the credentials are valid and false otherwise.</returns>
        virtual public bool Authenticate(NetworkCredential networkCredential)
        {
            return true;
        }
    }
}
